// 任务用到公共样式方法
import XRTheme from '@/styles/xr-theme.scss'

export default {
  data() {
    return {
      // 优先级列表 详情 任务列表 用到了 index 3 元素
      priorityList: [
        {
          id: 3,
          label: this.$t('oa.taskExamine.bf50520f838b72ae57964c0d7a6de7a2'),
          color: XRTheme.colorDanger
        },
        {
          id: 2,
          label: this.$t('oa.taskExamine.fa49367da5f596214207a1dc765df447'),
          color: XRTheme.colorWarning
        },
        {
          id: 1,
          label: this.$t('oa.taskExamine.fd98766c6b549906a6dfbf3ee96d2062'),
          color: XRTheme.colorSuccess
        },
        {
          id: 0,
          label: this.$t('oa.taskExamine.72650ee73397dc42e0f1b37a3970ddfb'),
          color: XRTheme.colorN40
        }
      ]
    }
  },

  methods: {
    getPriorityColor(priority) {
      if (priority == 1) {
        return {
          color: XRTheme.colorSuccess,
          label: this.$t('oa.taskExamine.1742276ead4de9589dbee9150a399ba5')
        }
      } else if (priority == 2) {
        return {
          color: XRTheme.colorWarning,
          label: this.$t('oa.taskExamine.0c3383bf257e35ca3de613ccd51bbd71')
        }
      } else if (priority == 3) {
        return {
          color: XRTheme.colorDanger,
          label: this.$t('oa.taskExamine.9db13452348b65df13cf42f0d328afc6')
        }
      } else {
        return {
          color: XRTheme.colorN40,
          label: this.$t('oa.taskExamine.f5568f3348df63e1d9891c440f34a6ab')
        }
      }
    }
  }
}
